GXCleanupOpenConnection
QuickDraw GX sends theGXCleanupOpenConnection
message when an operation that has to be undone fails during the processing of anGXOpenConnection
message. You need to override theGXCleanupOpenConnection
message if you perform operations that must be undone after a failure inGXOpenConnection
. Your override of theGXCleanupOpenConnection
message must match the following formal declaration:
void MyCleanupOpenConnection (void);DESCRIPTION
When an operation fails in your override of theGXOpenConnection
message, you need to call theGXCleanupOpenConnection
function.When you call the
GXCleanupOpenConnection
function, QuickDraw GX sends theGXCleanupOpenConnection
message to any message handlers that follow your printing extension or printer driver in the message chain. Each message handler is responsible for cleaning up any operations that it performed in itsGXOpenConnection
override. Usually this involves deallocating any storage that you allocated in your override of theGXOpenConnection
message to open the connection.The
GXCleanupOpenConnection
message follows the same path through the message chain as did the originalGXOpenConnection
message, which allows the cleaning up to occur in the correct order.The default implementation of the
GXCleanupOpenConnection
message disposes of memory allocated by the default implementation of theGXOpenConnection
message.SPECIAL CONSIDERATIONS
You never send theGXCleanupOpenConnection
message yourself; however, you can call theGXCleanupOpenConnection
function, which then sends this message.You need to forward the
GXCleanupOpenConnection
message so that other message handlers can perform their cleanup tasks.SEE ALSO
TheGXCleanupOpenConnection
function is described on page 5-36 in the chapter "Printing Functions for Message Overrides" in this book.The
GXOpenConnection
message is described in the previous section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help